<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun Build and Run Instructions: Building for OS X</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun Build and Run Instructions
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('md__building_o_s_x.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Building for OS X </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>You can use <a href="http://www.cmake.org">cmake</a> to generate an <a href="http://developer.apple.com/xcode/">Xcode</a> project for LiquidFun's Testbed and Unittests on <a href="http://www.apple.com/osx/">OS X</a>.</p>
<p>Alternatively, you can download a pre-generated Xcode project from the <a href="http://github.com/google/liquidfun/releases">release page</a>. The <a href="http://developer.apple.com/xcode/">Xcode</a> project is free of host-specific dependencies.</p>
<h3>Version Requirements</h3>
<p>These are the minimum required versions for building LiquidFun on OS X:</p>
<ul>
<li>OS X: Mavericks 10.9.1.</li>
<li>Xcode: 5.0.1</li>
<li>Xquartz: 2.7.5 (xorg-server 1.14.4)</li>
<li>cmake (when building from source) 2.8.12.1</li>
</ul>
<h3>Before Building</h3>
<ul>
<li>Install <a href="http://xquartz.macosforge.org/">Xquartz</a> to run LiquidFun sample applications. The Testbed uses <a href="http://freeglut.sourceforge.net/">freeglut</a>, which requires <a href="http://xquartz.macosforge.org/">Xquartz</a>.</li>
<li>Reboot your machine. Rebooting sets the <code>DISPLAY</code> environment variable for <a href="http://xquartz.macosforge.org/">Xquartz</a>, which enables sample applications to run correctly.</li>
</ul>
<h3>Creating the Xcode project using <a href="http://www.cmake.org">cmake</a></h3>
<p>When working directly with the source, you can generate the <a href="http://developer.apple.com/xcode/">Xcode</a> project using <a href="http://www.cmake.org">cmake</a>. <a href="http://www.cmake.org">cmake</a> version 2.8.12.1 or above is required to build this project on <a href="http://www.apple.com/osx/">OS X</a> 10.9 (Mavericks). For example, the following generates the Xcode project in the liquidfun/Box2D directory. </p>
<pre class="fragment">cd liquidfun/Box2D
cmake -G "Xcode"
</pre><h3>Building with <a href="http://developer.apple.com/xcode/">Xcode</a></h3>
<ul>
<li>Double-click on <code>liquidfun/Box2D/Box2D.xcodeproj</code> to open the project in <a href="http://developer.apple.com/xcode/">Xcode</a>.</li>
<li>Select "Product--&gt;Build" from the menu.</li>
</ul>
<h3>Executing a Sample</h3>
<ul>
<li>Select a sample <code>Scheme</code>, for example "Testbed--&gt;My Mac 64-bit", from the combo box to the right of the "Run" button.</li>
<li>Click the "Run" button.</li>
</ul>
<h3>Running Unit Tests</h3>
<p>Developers modifying the LiquidFun library can verify that it is still working correctly by executing the provided unit tests.</p>
<p>Use the run_tests.sh script to execute unit tests: </p>
<pre class="fragment">./liquidfun/Box2D/Unittests/run_tests.sh
</pre> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
